﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmpDeptPosEdit.aspx.cs" Inherits="Web.EmpDeptPosEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>部门职位资料</title>
    <base target="_self" />
    <meta content="ie=7" http-equiv="x-ua-compatible">
    <link href="Styles/Style01.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <link href="Styles/validate.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/easy_validator.pack.js" type="text/javascript"></script>
    <link href="Scripts/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery.autocomplete.js" type="text/javascript"></script>
    <script>
        function getAutoData() {
            $.ajax({
                type: "POST",
                url: "Position.mvc/GetPositionName",
                data: "posId=" + $("#Position").val(),
                dataType: "json",
                success: function (datas) {
                    $("#DeptPosName").autocomplete(datas, { minChars: 0, width: 200, max: 20, autoFill: true });
                }
            });
        }
        $(function () {
            $("[reg]").parents("td").prev().append("<font color='#ff0000'>*</font>");
            $("#Position").change(function () {getAutoData(); });
            getAutoData();
        });
    </script>
</head>
<body>
<form id="Form1" runat=server><input type=hidden runat=server id=EmpId />
<table class="s1">
    <tr>
        <td width=10%>部门</td>
        <td width=20%><select id="Dept" runat="server" title="请选择部门!" reg="."></select></td>
        </tr><tr>
        <td width=10%>职位</td>
        <td width=20%><select id="Position" runat="server" title="请选择职位!" reg="."></select></td>
        </tr><tr>
        <td width=10%>角色类型</td>
        <td><input id="DeptPosName" runat="server"></td>
    </tr>
</table>
<div style="text-align:right;margin-right:24px;margin-top:6px;">
    <asp:button runat="server" text="保存" id="btnSave" onclick="btnSave_Click"/>
    <input type=button value="返回" onclick="history.back();" />
</div>
</form>
</body>
</html>